import instance from "../url/qf.js";

const use_qf = async function (title) { 
    return await instance.get(`/qf/use_qf?qs=${title}`)
        .then((response) => {
            return response
        }).catch((error) => { 
              return "请求失败！"
        })
}

const up_load =async function (user_id,data) { 
    return await instance.post(`/qf/up_data?user_id=${user_id}`, { data })
        .then(() => {
            return 1 
        }).catch(() => { 
            return 0
        });
}  
const get_data = async function (user_id) { 
    return await instance.get(`/qf/get_data?user_id=${user_id}`)
        .then((response) => { 
            return response
        });
}
export { 
    up_load,
    get_data,
    use_qf
}